package com.huanguo.dashboard.bean

import java.util.Locale

/**
 * 作者：suichengju
 * 时间：2024/12/18:16:39
 * 邮箱：325927775@qq.com
 * 说明：首页数据
 */
class DashBoardDataBean {
    var sprayState: Boolean = false//喷淋状态：开状态为绿色、关状态为无色
    var manureUseUpAlarm: Boolean = false//肥料用尽告警：报警状态为黄色、正常状态为无色
    var manureBlockAlarm: Boolean = false//肥料堵塞告警：报警状态为红色、正常状态为无色
    var enginePreheatState: Boolean = false//发动机预热状态：预热状态为黄色、非预热状态为无色
    var engineFaultState: Boolean = false//发动机故障告警：报警状态为红色、正常状态为无色
    var oneTurnStateSwich: Boolean = false//一键调头：导航调头开关开启时显示绿色，关闭时显示无色
    var oilPressureAlarm: Boolean = false//油压告警：报警状态为红色、正常状态为无色
    var waterTemperatureAlarm: Boolean = false//水温告警：报警状态为红色、正常状态为无色
    private var engineWorkHours: Double = 0.00//发动机小时计：发动机累计工作小时
    var quantityBunkers: Int = 0//油量信息：显示车辆油量信息 0-100%
    var interpolationWorkSwichState: Boolean = false//插值离合开关状态：开状态为绿色、关状态为无色
    var riceShootUseUpAlarm: Boolean = false//秧苗用尽告警：报警状态为黄色、正常状态为无色
    var cellVoltage: Double = 0.00//电池电压：显示当前电池电压信息
    var throwSeed: Boolean = false// 抛秧状态指示
    var chargingFailure: Boolean = false// 充电故障
    var fuelAlarm: Boolean = false // 燃油报警
    var autoETurnFlag: Boolean = false // 自动调头标志显示

    fun getEngineWorkHours(): String {
        return "${String.format(Locale.getDefault(), "%.2f", engineWorkHours)}h"
    }

    fun setEngineWorkHours(engineWorkHours: Double) {
        this.engineWorkHours = engineWorkHours
    }
}